import { request } from './request.js';

// 获取园区公告列表
export function getAnnouncementList(params = {}) {
  return request({
    url: '/api/notifications/announcements/',
    method: 'GET',
    params
  });
}

// 获取园区公告详情
export function getAnnouncementDetail(id) {
  return request({
    url: `/api/notifications/announcements/${id}/`,
    method: 'GET'
  });
}

// 获取园区资讯列表
export function getConsultationList(params = {}) {
  return request({
    url: '/api/notifications/consultations/',
    method: 'GET',
    params
  });
}

// 获取园区资讯详情
export function getConsultationDetail(id) {
  return request({
    url: `/api/notifications/consultations/${id}/`,
    method: 'GET'
  });
}

// 获取用户特定消息列表
export function getUserMessages(params = {}) {
  return request({
    url: '/api/notifications/user-messages/',
    method: 'GET',
    params
  });
}

// 获取任意消息详情（通用接口，可以获取任何类型的消息）
export function getMessageDetail(id) {
  return request({
    url: `/api/notifications/messages/${id}/`,
    method: 'GET'
  });
} 